package com.atguigu.serviceedu.client;

import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

/**
 * @Author zzc
 * @Date 2022/10/14 19:13
 * @Version 1.0
 */
@Component
@FeignClient("service-order")
public interface OrdersClient {
    //根据课程id和用户id查询订单表status值是否为1(已支付)
    @GetMapping("/eduorder/order/isBuyCourse/{courseId}/{memberId}")
    public boolean isBuyCourse(
            @PathVariable("courseId") String courseId,//跨微服务需要在@PathVariable中加上 属性名
            @PathVariable("memberId") String memberId);
}
